<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/3/26 0026
  Time: 下午 3:20
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>Bootstrap 101 Template</title>

    <!-- Bootstrap -->
    <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <!-- HTML5 shim 和 Respond.js 是为了让 IE8 支持 HTML5 元素和媒体查询（media queries）功能 -->
    <!-- 警告：通过 file:// 协议（就是直接将 html 页面拖拽到浏览器中）访问页面时 Respond.js 不起作用 -->
    <!--[if lt IE 9]>

    <![endif]-->
    <style>
        .img-responsive1{
            width: 100%;
        }
        .ss{
            margin-top: 10px;
        }
        .kk{
            margin-left: 850px;
        }
    </style>
</head>
<script>
    function df() {
        var t =document.getElementById("inputEmail2")
        var phon=t.value
        var regexp=new RegExp("^[0-9]{11}$")
        if (regexp.test(phon)){
            document.getElementById("ph").innerHTML=""
            return true
        }else {
            document.getElementById("ph").innerHTML="电话格式错误,请输入数字为11位"
            return false
        }
    }

    function of() {
        var d =document.getElementById("inputEmail1")
        var idd= d.value
        var regexp=new RegExp("^[0-9]{6,14}$")
        if (regexp.test(idd)){
            document.getElementById("id").innerHTML=""
            return true
        }else {
            document.getElementById("id").innerHTML="id格式错误,请输入数字为6到14位"
            return false
        }
    }
    
</script>
    <script>
        $(function () {
          $("#inputEmail3").onclick(function () {

          })   
        })
    </script>
<body>

<!--第一行-->
<div class="row paddtop">
    <img src="images/top_banner.jpg" class="img-responsive1" >
</div>
<div class="row">
    <div class="col-md-3">

    </div>
    <div class="col-md-7">

    </div>
    <div class="col-md-2">
        <span>点击切换</span>
        <a href="login.jsp" class="btn btn-default">登录</a>
        <a href="register.jsp" class="btn btn-default">注册</a>
    </div>
</div>

<br>
<br>
<br>
<br>
<br>
<center><h1>用户信息管理系统</h1></center>
<form class="form-horizontal" action="/AddServlet" method="post">
    <div class="form-group">
        <label for="inputEmail3" class="col-sm-4 control-label">ID</label>
        <div class="col-sm-4">
            <input type="text" class="form-control" id="inputEmail1" placeholder="请输入ID" onclick="of()" name="id" >
        </div>
        <div  class="col-sm-3.5">
            <span id="ID" style="color: firebrick" ></span>
        </div>
    </div>
    <div class="form-group">
        <label for="inputEmail3" class="col-sm-4 control-label">电话</label>
        <div class="col-sm-4">
            <input type="text" class="form-control" id="inputEmail2" placeholder="请输入电话" onclick="df()" name="phone" >
        </div>
        <div  class="col-sm-3.5">
            <span id="ph" style="color: firebrick" ></span>
        </div>
    </div>
    <div class="form-group">
        <label for="inputEmail3" class="col-sm-4 control-label">姓名</label>
        <div class="col-sm-4">
            <input type="text" class="form-control" id="inputEmail3" placeholder="请输入姓名"  name="name" >
        </div>
        <div  class="col-sm-3.5">
            <span id="xm" style="color: firebrick" ></span>
        </div>
    </div>
    <div class="form-group">
        <label for="inputEmail3" class="col-sm-4 control-label">年龄</label>
        <div class="col-sm-4">
            <input type="text" class="form-control" id="inputEmail4" placeholder="请输入年龄"  name="age" >
        </div>
        <div  class="col-sm-3.5">
            <span id="xb" style="color: firebrick" ></span>
        </div>
    </div>
    <%--<div class="form-group">
        <label for="inputEmail3" class="col-sm-4 control-label">性别</label>
        <div class="col-sm-4">
            <input type="text" class="form-control" id="inputEmail5" placeholder="请输入年龄"  name="sex" >
        </div>
        <div  class="col-sm-3.5">
            <span id="nl" style="color: firebrick" ></span>
        </div>
    </div>--%>
    <div class="form-group">
    <label for="inputEmail3" class="col-sm-4 control-label">性别</label>
        <div class=" col-sm-4 col-sm-offset-0.5 ">
            <input type="radio"  id="inputEmail5" class="ss"  name="sex" value="男">男 &nbsp;&nbsp;
            <input type="radio"  id="inputEmail6"  class="ss" name="sex" value="女">女
        </div>
    </div>
    <br>
    <br>
    <br>

    <div class="form-group">

        <div class="col-sm-offset-5 col-sm-7 kk" >
            <button type="submit"  class="btn btn-default">提交</button>
            <button type="reset" class="btn btn-default ">取消</button>
            <button type="button" class="btn btn-default " onclick="fan()" >返回</button>
        </div>


    </div>
</form>
<!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
<script src="bootstrap/js/jquery-3.3.1.min.js"></script>
<!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
<script src="bootstrap/js/bootstrap.min.js"></script>
</body>
<script>
    function fan() {
        history.go(-1)
    }
</script>
</html>
